The present invention relates in general to a method for determining the intensity and color parameters used to render shaded patterns on a video display. More particularly, the invention defines a method for selectively and adaptively modifying the shading procedure in relation to the surface gradient and the location of the light source, with the objective of providing picture realism typical of Phong shading without incurring the graphics system computational burden associated with pure Phong shading.
Static and dynamic three dimensional images are routinely generated by conventional workstation grade computers. The effects of light impinging on and reflected from the three dimensional surfaces being rendered requires that the color parameter calculations account for object surface contour and light source location characteristics. Fundamentally, the fewer the discontinuities in the rendered shading the greater the realism of the image being portrayed.
The ideal method of shading a simulated object subject to display involves the individualized calculation of intensity and hue for each pixel depicted on the screen. Unfortunately, workstation video display screens routinely have well in excess of one million pixels. The computational burden associated with such idealized methods of shading is very significant, resulting in slow real time image regeneration. The delays in rendering shaded patterns would obviously become quite pronounced and unacceptable for images of dynamic objects.
Intensity interpolation shading, generally referred to as Gouraud shading and normal vector interpolation shading, generally referred to as Phong shading, are described in the text books "Fundamentals of Interactive Computer Graphics" by Foley et al. an Addison-Wesley publication of copyright 1982. and "Computer Graphics" by Hearn et al. a Prentice-Hall publication of copyright 1986. Refinements in the interpolation of intensity magnitudes are described in U.S. Pat. No. 4,805,116. A refined use of a raster scan display to render polygon objects is described in U.S. Pat. No. 4,725,831.
In general Gouraud shading involves the calculation of intensity values at the vertices of defined polygons followed by linear interpolations of intensity for the remaining surface of the polygon from such vertex values. Though computationally efficient, the Gouraud method of shading ignores the non-linear relationships between the incident light vectors, the surface normal vectors and the intensity of the reflected-light.
The Phong shading method linearly interpolates the surface normal vectors between polygon vertices, rather than the intensity itself. Thereafter, such interpolated vectors are used to calculate the intensity at each pixel position within the polygon to account for incident light location and surface normal orientation effects on the derived intensity for each pixel. The computational burden of such custom rendering by pixel is significant.
Experience with the shaded rendering of numerous images has confirmed that Gouraud shading is quite adequate and realistic for image surfaces having certain types of illumination and surface normal characteristics, yet woefully inadequate for adjacent image areas with somewhat different sets of such characteristics. Consequently, if Gouraud shading is implemented to ease the computational burden, image realism degrades significantly for some, but not all, objects. On the other hand, if Phong shading is utilized for rendering, hardware cost, generation speed and image dynamic capability suffer. Therefore, there existed a need for a method of shading which exhibits the computational characteristics of Gouraud shading while providing the realism of Phong shading, and which can be implemented selectively and adaptively based upon the idiosyncrasies of the object subject to shading.